﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using AAA.Meta.Trade;
using AAA.Meta.Trade.Data;

namespace AAA.Trade
{
    public interface ITrade
    {
        void OnMessage(MessageEvent messageEvent);
        object InitProgram(AccountInfo accountInfo);
        object CA();
        object Login();
        object Logout();
        object SendOrder(OrderInfo orderInfo);
        object CancelOrder(OrderInfo orderInfo);
        object ChangeQuantity(OrderInfo orderInfo);
        object ChangePrice(OrderInfo orderInfo);
        object GetOrderStatus(OrderInfo orderInfo);
        object GetDealReport(string strStartDate, string strEndDate);
        object GetOrderReport(string strStartDate, string strEndDate);
        object GetCoverReport(string strStartDate, string strEndDate);
        object GetPositionReport();
        object GetTodayEquity();
        string QuerySymbolCode(string strSymbolType, string strStrikePrice, string strPubOrCall, string strYear, string strMonth);
        Dictionary<string, string> SplitMessage(string strMessage, string strMessageType);
        bool IsConnected();        
        TradeModeEnum TradeMode { get; set; }
        AccountInfo AccountInfo { get; }
        bool IsAutoReconnect { get; set; }
        void AddTradeLogger(AAA.Logger.Logger logger);
        void RemoveTradeLogger(AAA.Logger.Logger logger);
    }
}
